package com.clock.domain.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.Date;
import java.util.Objects;


@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@ApiModel("用户关注")
public class Follow {
    
    @ApiModelProperty("关注id")
    private Long followId;
    
    @ApiModelProperty("用户id")
    private Long userId;
    
    @ApiModelProperty("用户关注id")
    private Long followUserId;
    
    @ApiModelProperty("0-取消关注;1-正在关注")
    private Integer isFollowed;
    
    @ApiModelProperty("创建时间")
    private Date creatTime;
    
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Follow follow = (Follow) o;
        return Objects.equals(followId, follow.followId) && Objects.equals(userId, follow.userId) && Objects.equals(followUserId, follow.followUserId) && Objects.equals(isFollowed, follow.isFollowed);
    }

    @Override
    public int hashCode() {
        return Objects.hash(followId, userId, followUserId, isFollowed, creatTime);
    }
}

